<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>@title@</title>
    <link rel="stylesheet" href="index.css"/>
    <script type="application/javascript" src="index.js"></script>
</head>
<body>
<div style="display:flex;justify-content: space-between;">
    <div>
        <label id="h1"></label>
        (<label id='total1'></label>)：
    </div>
    <a id="page2" style="padding: 3px 8px;"></a>
</div>
<hr/>
<div id="p1"/>
<script type="application/javascript">
    var web = window.location.pathname.includes("web")
    var $=function(id){ return document.getElementById(id);} , $h1=$("h1"), $page2=$("page2");
    if (web) {
        document.title = "@profile@-虚拟目录";
        $h1.innerHTML = "@profile@-虚拟目录图示 " ;
        $page2.innerHTML = "index.html" ;
        $page2.style.backgroundColor = "darkblue";
        $page2.setAttribute("href", "./index.html");
    } else {
        document.title = "@profile@-网关转发"
        $h1.innerHTML = "@profile@-网关转发图示 ";
        $page2.innerHTML = "web-index.html" ;
        $page2.style.backgroundColor = "darkmagenta";
        $page2.setAttribute("href","./web-index.html");
    }

    var data = @data@;
    $("p1").innerHTML = gen(data);
    $("total1").innerHTML = data.map(it => it.total).sum()


</script>
</body>
</html>